import { lazy } from 'react';
import { Navigate } from 'react-router-dom';
const Recommend = lazy(() => import('@/views/recommend/Recommend'));
const Musichall = lazy(() => import('@/views/musichall/Musichall'));
const Video = lazy(() => import('@/views/video/Video'));
const Ranking = lazy(() => import('@/views/ranking/Ranking'));
const Login = lazy(() => import('@/views/login//Login'));
const NotFound = lazy(() => import('@/views/not-found/NotFound'));
const Playlist = lazy(() => import('@/views/playlist/Playlist'));

const routes = [
  {
    path: '/',
    element: <Navigate to='/recommend' />
  },
  {
    name: 'recommend',
    path: '/recommend',
    element: <Recommend />
  },
  {
    name: 'musichall',
    path: '/musichall',
    element: <Musichall />

  },
  {
    name: 'video',
    path: '/video',
    element: <Video />
    
  },
  {
    name: 'ranking',
    path: '/ranking',
    element: <Ranking />
  },
  {
    name: 'Playlist',
    path: '/playlist',
    element: <Playlist />
  },
  {
    name: 'login',
    path: '/login',
    element: <Login />,
    meta: {
      title: '登录'
    }
  },
  {
    name: 'not-found',
    path: '*',
    element: <NotFound />,
    meta: {
      title: '404'
    }
  },
]


export default routes